package com.hdoit.ares.web.claim.modelconfig;
import com.hdoit.ares.web.claim.providers.ApplyforTypeProvider;
import com.hdoit.ares.web.claim.providers.TrackTypeProvider;
import com.tennetcn.common.enums.regular.RegularExpressions;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RegularExpressionAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;
import com.tennetcn.web.cbase.providers.SexProvider;

/**
 * @author      yujinhui
 * @email       
 * @createtime  2017年11月03日 09:17:27
 * @comment
 */
public class ClaimApplyforConfig extends ModelMetadataAttributeConfiguration{
    public ClaimApplyforConfig(){
        this.setProperty("sex")
            .hasAttribute(new DisplayNameAttribute("性别"))
            .hasAttribute(new RequiredAttribute("性别为必填项"))
            .hasAttribute(new DropDownListAttribute(new SexProvider()));

        this.setProperty("name")
            .hasAttribute(new DisplayNameAttribute("申请人姓名"))
            .hasAttribute(new RequiredAttribute("申请人姓名为必填项"));

        this.setProperty("product")
            .hasAttribute(new DisplayNameAttribute("理赔产品"))
            .hasAttribute(new RequiredAttribute("理赔产品为必填项"));

        this.setProperty("account")
            .hasAttribute(new DisplayNameAttribute("用户号"));
        
        this.setProperty("createDate")
        .hasAttribute(new DisplayNameAttribute("申请日期"));

        this.setProperty("phone")
            .hasAttribute(new DisplayNameAttribute("联系电话"))
            .hasAttribute(new RequiredAttribute("联系电话为必填项"))
            .hasAttribute(new RegularExpressionAttribute(RegularExpressions.mobile));

        this.setProperty("comments")
            .hasAttribute(new DisplayNameAttribute("需求描述"));

        this.setProperty("orderNum")
            .hasAttribute(new DisplayNameAttribute("理赔订单号"));

        this.setProperty("state")
            .hasAttribute(new DisplayNameAttribute("申请状态"))
            .hasAttribute(new DropDownListAttribute(new ApplyforTypeProvider()));
        
        this.setProperty("trackPeopleName")
        .hasAttribute(new DisplayNameAttribute("跟踪人"));
        
        this.setProperty("trackDate")
        .hasAttribute(new DisplayNameAttribute("开始跟踪时间"));
        
        this.setProperty("trackState")
        .hasAttribute(new DisplayNameAttribute("跟踪状态"))
        .hasAttribute(new DropDownListAttribute(new TrackTypeProvider()));
    }
}